{extend name="./app/system/view_mobile/public/layout.html" /}
{block name="title"}个人中心{/block}
{block name="head"}
<style>
	.icon-svg {
		width:32px; height:12vw;
		overflow: hidden;
	}
</style>
<link rel="stylesheet" href="//at.alicdn.com/t/font_521842_n06p57obqba3v7vi.css">
<script type="application/javascript" src="//at.alicdn.com/t/font_521842_n06p57obqba3v7vi.js"></script>
{/block}
{block name="body"}
<div class="index-title" style="border-top:none;">行程列表</div>
<div class="lattice-9">
	<a class="item icon-color-4" href="/system/op/index.html?mid=14&tpl=lb_plan&order_type=1">
		<div id="q1"></div>
		<span class="iconfont icon-daba8"></span>
		<div class="text">即将开始</div>
	</a>
	<a href="/system/op/index.html?mid=14&tpl=lb_plan&order_type=2" class="item icon-color-5">
		<div id="q2"></div>
		<span class="iconfont icon-lvyoudabache-kuai"></span>
		<div class="text">
			正在进行
		</div>
	</a>
	<a href="/system/op/index.html?mid=14&tpl=lb_plan&order_type=3" class="item icon-color-3">
		<div id="q3"></div>
		<span class="iconfont icon-dabache"></span>
		<div class="text">
			已完成
		</div>
	</a>
</div>
<div class="index-title" style="border-top:none;">财务统计</div>
<div class="lattice-9">
	<a href="/system/op/index.html?mid=14&tpl=lb_account&order_type=3" class="item icon-color-4">
		<span class="iconfont icon-kaoqin"></span>
		<div class="text">
			结算统计
		</div>
	</a>
	<a href="/system/logic.order/paymoney.html" class="item icon-color-5">
		<span class="iconfont icon-jiesuan"></span>
		<div class="text">
			客户欠款
		</div>
	</a>
	<a href="/system/logic.order/hedge.html" class="item icon-color-9">
		<span class="iconfont icon-baoxiao"></span>
		<div class="text">
			往来对冲
		</div>
	</a>
</div>
<div class="index-title" style="border-top:none;">运行状态</div>
<div class="lattice-9">
	<a href="/system/op/index.html?mid=5&tpl=car_index" class="item icon-color-1">
		<span class="iconfont icon-daba8"></span>
		<div class="text">
			车辆状态
		</div>
	</a>
	<a href="/system/op/index.html?mid=16&tpl=driver_index" class="item icon-color-3">
		<span class="iconfont icon-qingjia"></span>
		<div class="text">
			司机状态
		</div>
	</a>
	<a href="/system/op/index.html?mid=12&tpl=leave_apply&leave_status=0" class="item icon-color-3">
		<span class="iconfont icon-shenqing"></span>
		<div class="text">
			请假审核
		</div>
	</a>
	<a href="javascript:;" onclick="exitLogin();" class="item icon-color-8">
		<svg class="icon-svg" aria-hidden="true">
			<use xlink:href="#icon-weixin"></use>
		</svg>
		<div class="text">
			微信解绑
		</div>
	</a>
</div>
{/block}
{block name="script"}
	<script type="text/javascript">
		$(function () {
            getOrderCount();
        })
		//解除绑定
		function exitLogin(){
			var url='/system/index/exitlogin.html';
            $.confirm("确认要解除和自己微信的绑定么？", function() {
                location.href=url;
            });
		}
		function getOrderCount() {
		   var url="{:url('logic.query/getOrderCount')}";
		   $.post(url,{driver:1},function (res) {
			   console.log(res);
			   if(res.q4>0){
			       location.href="{:url('system/Op/index',['tpl'=>'order_confirm'])}";
			   }else{
			       if(res.q1>0){
			          $('#q1').html('<div class="corner"><span class="num">'+res.q1+'</span></div>')
				   }
                   if(res.q2>0){
                       $('#q2').html('<div class="corner"><span class="num">'+res.q2+'</span></div>')
                   }
			   }
           })
        }
	</script>
{/block}